<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>配置方案信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../../style/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :model="form" ref="contract" :rules="rules" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">生效时间</div>
            </div>
            <el-descriptions :column="3" border size="small">
                <el-descriptions-item label="是否长期">
                    <el-form-item prop="Type_Date">
                        <el-select style="width: 100%;" @change="handleDate" placeholder="请选择商品" filterable v-model.trim="form.Type_Date" >
                            <el-option label="短期" value="0"></el-option>
                            <el-option label="长期" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="开始时间">
                    <el-form-item prop="Start_Date">
                      <el-date-picker style="width: 100%;" v-model.trim="form.Start_Date" type="datetime" placeholder="请选择开始时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="结算时间">
                    <el-form-item prop="End_Date">
                      <el-date-picker style="width: 100%;" :disabled="form.Type_Date=='1'" v-model.trim="form.End_Date" type="datetime" placeholder="请选择结算时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">适用商品</div>
                <div class="operation">
                    <el-button type="primary" size="small" @click="add_member_share_config_article">新增</el-button>
                    <el-button type="danger" size="small" @click="remove_member_share_config_article">删除</el-button>
                </div>
            </div>
            <el-descriptions :column="2" border size="small" v-for="(item,index) in form.Children.member_share_config_article" :key="index">
                <el-descriptions-item label="适用商品">
                    <el-form-item prop="Article_SerialNumber">
                        <el-select style="width: 100%;" placeholder="请选择商品" filterable v-model.trim="item.Article_SerialNumber" >
                            <el-option v-for="(item,index) in article" :key="index" :label="item.Article_Name" :value="item.Article_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="方案类型">
                    <el-form-item prop="Config_Type">
                        <el-select style="width: 100%;" placeholder="请输入方案类型" filterable v-model.trim="item.Divide_Type" >
                            <el-option v-for="(item,index) in arr" :key="index" :label="item.label" :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item :label="item.Divide_Type=='0'?'分销比例':'分销金额'">
                    <el-form-item prop="Divide_Amount">
                        <el-input style="width: 100%;" v-model.trim="item.Divide_Amount" placeholder="请输入方案金额"></el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="适用天数">
                    <el-form-item prop="Divided_Days">
                        <el-input style="width: 100%;" v-model.trim="item.Divided_Days" placeholder="请输入方案金额"></el-input>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../../utils/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../../utils/utils.js"></script>
    <script type="text/javascript" src="../../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="./js/MemberShareConfig.js"></script>
</body>

</html>